<?php

class AutoreplyModel extends Model {

    protected $_validate = array (
		array('name','require','关键词重复', 1 , unique , Model::MODEL_INSERT),
    );	

    protected $_auto = array (
		array('createTime','time',Model::MODEL_INSERT,'function'),		
		array('updateTime','time',Model::MODEL_BOTH,'function'),
		array('article','_share',Model::MODEL_BOTH,'callback'),
	);

    protected function _share(){
        if (I('post.articleID')) {
            $share = implode(',',I('post.articleID'));
        }else{
            $share = '';
        }        
        return $share;
    }
}
?>